package net.ziyoushu.demo1;


import net.ziyoushu.demo1.annotation.RocketMqTag;
import net.ziyoushu.demo1.annotation.RocketMqTopic;
import org.apache.rocketmq.common.message.MessageExt;

import java.io.UnsupportedEncodingException;

@RocketMqTopic(topic = "TopicTest2")
public class ConsumerService2{

    @RocketMqTag(tag = "TagA")
    public Boolean consumer(MessageExt msg) throws UnsupportedEncodingException {
        System.out.println("消费点2哈哈:"+msg.getTopic()+":"+msg.getTags()+new String(msg.getBody(), "UTF-8"));
        return true;
    }
}
